package util;

import gui.image.ImagePanel;

/**
 *
 * @author Quân
 */
public class Clipboard {

    public static final int COPY = 1;
    public static final int CUT = 2;
    private static Clipboard instance = null;
    private ImagePanel imagePanel;
    private int type;

    public int getType() {
        return type;
    }

    private Clipboard() {
    }

    public static Clipboard getInstance() {
        if (instance == null) {
            instance = new Clipboard();
        }
        return instance;
    }

    public void setClipboard(ImagePanel imagePanel) {
        this.imagePanel = imagePanel;
        this.type = COPY;
    }

    public void setData(ImagePanel imagePanel, int type) {
        this.imagePanel = imagePanel;
        this.type = type;
    }

    public ImagePanel getData() {
        return this.imagePanel;
    }
}
